<?php

namespace Wilead\IArtistBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;

/**
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Wilead\IArtistBundle\Repository\JobRepository")
 */
class Job
{

    /**
     * @ORM\Column(type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @ORM\Column(type="string")
     * @Assert\NotBlank()
     */
    private $title;

    /**
     * @ORM\Column(type="string", nullable=true)
     */
    private $skills;

    /**
     * @ORM\Column(type="integer", nullable=true)
     */
    private $cat;

    /**
     * @ORM\Column(type="text", nullable=true)
     */
    private $description;

    /**
     * @ORM\Column(type="string", nullable=true)
     */
    private $demand;

    /**
     * @ORM\Column(type="text", nullable=true)
     */
    private $pay;

    /**
     * @ORM\Column(type="date", nullable=true)
     */
    private $deadline;

    /**
     * @ORM\ManyToOne(targetEntity="User", inversedBy="Jobs")
     * @ORM\JoinColumn(name="userId", referencedColumnName="id", nullable=false)
     * */
    private $User;

    /**
     * @ORM\Column(type="string", nullable=true)
     */
    private $pointx;

    /**
     * @ORM\Column(type="string", nullable=true)
     */
    private $pointy;

    /**
     * @ORM\OneToMany(targetEntity="JobResume", mappedBy="Job")
     */
    private $Resumes;

    /**
     * @Gedmo\Timestampable(on="create")
     * @ORM\Column(type="datetime")
     */
    private $created;

    /**
     * @Gedmo\Timestampable(on="update")
     * @ORM\Column(type="datetime")
     */
    private $updated;

    /**
     * Constructor
     */
    public function __construct()
    {
        $this->Resumes = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set title
     *
     * @param string $title
     * @return Job
     */
    public function setTitle($title)
    {
        $this->title = $title;

        return $this;
    }

    /**
     * Get title
     *
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Set description
     *
     * @param string $description
     * @return Job
     */
    public function setDescription($description)
    {
        $this->description = $description;

        return $this;
    }

    /**
     * Get description
     *
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Set demand
     *
     * @param string $demand
     * @return Job
     */
    public function setDemand($demand)
    {
        $this->demand = $demand;

        return $this;
    }

    /**
     * Get demand
     *
     * @return string
     */
    public function getDemand()
    {
        return $this->demand;
    }

    /**
     * Set pay
     *
     * @param string $pay
     * @return Job
     */
    public function setPay($pay)
    {
        $this->pay = $pay;

        return $this;
    }

    /**
     * Get pay
     *
     * @return string
     */
    public function getPay()
    {
        return $this->pay;
    }

    /**
     * Set deadline
     *
     * @param \DateTime $deadline
     * @return Job
     */
    public function setDeadline($deadline)
    {
        $this->deadline = $deadline;

        return $this;
    }

    /**
     * Get deadline
     *
     * @return \DateTime
     */
    public function getDeadline()
    {
        return $this->deadline;
    }

    /**
     * Set User
     *
     * @param \Wilead\IArtistBundle\Entity\User $user
     * @return Job
     */
    public function setUser(\Wilead\IArtistBundle\Entity\User $user)
    {
        $this->User = $user;

        return $this;
    }

    /**
     * Get User
     *
     * @return \Wilead\IArtistBundle\Entity\User
     */
    public function getUser()
    {
        return $this->User;
    }

    /**
     * Add Resumes
     *
     * @param \Wilead\IArtistBundle\Entity\JobResume $resumes
     * @return Job
     */
    public function addResume(\Wilead\IArtistBundle\Entity\JobResume $resumes)
    {
        $this->Resumes[] = $resumes;

        return $this;
    }

    /**
     * Remove Resumes
     *
     * @param \Wilead\IArtistBundle\Entity\JobResume $resumes
     */
    public function removeResume(\Wilead\IArtistBundle\Entity\JobResume $resumes)
    {
        $this->Resumes->removeElement($resumes);
    }

    /**
     * Get Resumes
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getResumes()
    {
        return $this->Resumes;
    }

    /**
     * Set created
     *
     * @param \DateTime $created
     * @return Job
     */
    public function setCreated($created)
    {
        $this->created = $created;

        return $this;
    }

    /**
     * Get created
     *
     * @return \DateTime
     */
    public function getCreated()
    {
        return $this->created;
    }

    /**
     * Set updated
     *
     * @param \DateTime $updated
     * @return Job
     */
    public function setUpdated($updated)
    {
        $this->updated = $updated;

        return $this;
    }

    /**
     * Get updated
     *
     * @return \DateTime
     */
    public function getUpdated()
    {
        return $this->updated;
    }

    /**
     * Set cat
     *
     * @param integer $cat
     * @return Job
     */
    public function setCat($cat)
    {
        $this->cat = $cat;

        return $this;
    }

    /**
     * Get cat
     *
     * @return integer
     */
    public function getCat()
    {
        return $this->cat;
    }

    /**
     * Set points
     *
     * @param point $points
     * @return Job
     */
    public function setPoints($points)
    {
        $this->points = $points;

        return $this;
    }

    /**
     * Get points
     *
     * @return point
     */
    public function getPoints()
    {
        return $this->points;
    }

    /**
     * Set skills
     *
     * @param string $skills
     * @return Job
     */
    public function setSkills($skills)
    {
        $this->skills = $skills;

        return $this;
    }

    /**
     * Get skills
     *
     * @return string
     */
    public function getSkills()
    {
        return $this->skills;
    }


    /**
     * Set pointx
     *
     * @param string $pointx
     * @return Job
     */
    public function setPointx($pointx)
    {
        $this->pointx = $pointx;
    
        return $this;
    }

    /**
     * Get pointx
     *
     * @return string 
     */
    public function getPointx()
    {
        return $this->pointx;
    }

    /**
     * Set pointy
     *
     * @param string $pointy
     * @return Job
     */
    public function setPointy($pointy)
    {
        $this->pointy = $pointy;
    
        return $this;
    }

    /**
     * Get pointy
     *
     * @return string 
     */
    public function getPointy()
    {
        return $this->pointy;
    }
}